package com.example.sharding.manager.impl;

import com.example.sharding.manager.IOrderManager;
import com.example.sharding.model.OrderModel;
import com.example.sharding.repository.IOrderRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 刘房
 * @Description: 测试业务数据
 * @date 2020/9/3 10:16
 */
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Service
public class OrderManagerImpl implements IOrderManager {

    @Autowired
    private IOrderRepository orderRepository;

    @Override
    public void save(OrderModel orderModel) {
        orderRepository.save(orderModel);
    }

    @Override
    public List<OrderModel> findAll() {
        return orderRepository.findAll();
    }
}
